We present the summary of the theoretical aspects and algorithms used in an undergraduate (JRG) summer project based on numerical N-body simulations of collisionless systems. First, we review the importance of numerical N-body simulations in astrophysics. We introduce the different codes used and their performances. We then introduce four famous density profiles : Hernquist, NFW, truncated isothermal sphere, and Plummer. The history of these profiles and their dynamical properties are discussed in the third section. In the fourth section, we present the Barnes & Hut tree code, its features and performances. We then explain how to build and incorporate a multiple time stepping scheme in a tree code. The fifth section is dedicated to the different physical measurements we used to characterize the dynamics of the N-body system. Finally, we describe the future work that will be done with these codes, mainly the study of the adiabatic growth of a black hole at the center of a spherical distribution of stars.